-
Notifications
You must be signed in to change notification settings - Fork 64
Distributed Tracing for Entities #547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a screenshot of a trace from Application Insights showing that a signal_entity
call from a Python function creates the right trace?
Also, can you fix the linter issues that are showing up in the CI? Please reach out if you need help with this.
…automatic extraction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
* Adds support for distributed tracing for Durable entities in Python --------- Authored-by: Sophia Tevosyan <[email protected]>
This PR adds additional information passing to enable distributed tracing for entities.
DurableOrchestrationClient.signal_entity
was modified to pass the current trace context in its HTTP headers (similar to how is done in thestart_new
call) such that the trace for signaling the entity created in WebJobs can correctly be linked as a child of the client trace that triggered the signal entity request.OperationResult
such that the traces can accurately capture the time it takes for the request to be completed (using theOperationResult.duration
field to calculate the end time).Note that for a client signaling an entity via
DurableOrchestrationClient.signal_entity
, in order for this method to be able to obtain the current trace context, the user needs to actually start their own trace from their function app. An example is provided in this PR for a client starting an orchestration (the example code would be identical in this case, withclient.start_new
replaced byclient.signal_entity
):Client Signaling an Entity
Which leads to the following trace

Orchestartion Calling/Signaling an Entity
Whereas starting the following orchestration
leads to the following trace
